# -*- coding: utf-8 -*-
import re

# 海囤全球
jd_hk = 'https://search.jd.hk/Search?keyword=%E6%89%8B%E6%9C%BA&enc=utf-8'

# 京东
jd_com = 'https://search.jd.com/Search?keyword=%E6%89%8B%E6%9C%BA&enc=utf-8&wq=%E6%89%8B%E6%9C%BA&pvid=bc9163c412734694b439a89064135df9'

# 天猫
tm_com = 'https://list.tmall.com/search_product.htm?q=%C1%E3%CA%B3&type=p&vmarket=&spm=875.7931836%2FB.a2227oh.d100&from=mallfp..pc_1_searchbutton'

# 天猫国际
tm_hk = 'https://list.tmall.hk/search_product.htm?q=%C1%E3%CA%B3&spm=a2231.7710505.a2227oh.d100&type=p&from=tmallhk.list.pc_1_searchbutton'

# 淘宝
tb_com = 'https://uland.taobao.com/sem/tbsearch?refpid=mm_26632360_8858797_29866178&clk1=5f78fe9555d1f1e8a20dd35297ea25c2&keyword=%E6%89%8B%E6%9C%BA&page=0'


url_lists = [jd_com, jd_hk, tm_com, tm_hk, tb_com]

pattern = '//(.+?)/'
for str in url_lists:
    name = re.findall(pattern, str)[0]
    if name == 'search.jd.com':
        choice = 1
        print('京东商城')
    elif name == 'search.jd.hk':
        choice = 2
        print('海囤全球')
    elif name == 'list.tmall.com':
        choice = 3
        print('天猫商城')
    elif name == 'list.tmall.hk':
        choice = 4
        print('天猫国际')
    elif name == 'uland.taobao.com':
        choice = 5
        print('淘宝商城')
    else:
        choice = 0
        print('不知道')
